#!/bin/bash

# Install wasm-pack if not already installed
if ! command -v wasm-pack &> /dev/null; then
    cargo install wasm-pack
fi

# Build the WebAssembly package
wasm-pack build --target web

# Create pkg directory if it doesn't exist
mkdir -p pkg

# Copy the generated files to pkg directory
cp pkg/*.js pkg/
cp pkg/*.wasm pkg/
cp pkg/*.d.ts pkg/ 